package com.sense.common.exception;

import com.sense.common.lang.BizCode;
import com.sense.common.lang.OpenCode;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: jiangyong
 * @Date: 2024/11/28/9:47
 * @Description:
 */
@Getter
@Setter
public class BizException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private Integer code;
    private String message;

    public BizException(OpenCode oc){
        this.code = oc.getCode();
        this.message = oc.getMessage();
    }
    public BizException(BizCode bc){
        this.code = bc.getCode();
        this.message = bc.getMessage();
    }
}
